package com.xiaoshuidi.cloud.module.finance.enums;

import com.xiaoshuidi.cloud.framework.common.exception.ErrorCode;

/**
 * Pay 错误码 Core 枚举类
 * <p>
 * pay 系统，使用 1-007-000-000 段
 */
public interface ErrorCodeConstants {

    /**
     * ========== APP 模块 1-007-000-000 ==========
     */
    ErrorCode PAY_APP_NOT_FOUND = new ErrorCode(1007000000, "App 不存在");
    ErrorCode PAY_APP_IS_DISABLE = new ErrorCode(1007000002, "App 已经被禁用");
    ErrorCode PAY_APP_EXIST_TRANSACTION_ORDER_CANT_DELETE = new ErrorCode(1007000003, "支付应用存在交易中的订单,无法删除");

    /**
     * ========== CHANNEL 模块 1-007-001-000 ==========
     */
    ErrorCode PAY_CHANNEL_NOT_FOUND = new ErrorCode(1007001000, "支付渠道的配置不存在");
    ErrorCode PAY_CHANNEL_IS_DISABLE = new ErrorCode(1007001001, "支付渠道已经禁用");
    ErrorCode PAY_CHANNEL_CLIENT_NOT_FOUND = new ErrorCode(1007001002, "支付渠道的客户端不存在");
    ErrorCode CHANNEL_NOT_EXISTS = new ErrorCode(1007001003, "支付渠道不存在");
    ErrorCode CHANNEL_EXIST_SAME_CHANNEL_ERROR = new ErrorCode(1007001005, "已存在相同的渠道");
    ErrorCode CHANNEL_WECHAT_VERSION_2_MCH_KEY_IS_NULL = new ErrorCode(1007001006, "微信渠道v2版本中商户密钥不可为空");
    ErrorCode CHANNEL_WECHAT_VERSION_3_PRIVATE_KEY_IS_NULL = new ErrorCode(1007001007, "微信渠道v3版本apiclient_key.pem不可为空");
    ErrorCode CHANNEL_WECHAT_VERSION_3_CERT_KEY_IS_NULL = new ErrorCode(1007001008, "微信渠道v3版本中apiclient_cert.pem不可为空");
    ErrorCode PAY_CHANNEL_NOTIFY_VERIFY_FAILED = new ErrorCode(1007001009, "渠道通知校验失败");

    // ========== ORDER 模块 1-007-002-000 ==========

    ErrorCode PAY_ORDER_NOT_FOUND = new ErrorCode(1007002000, "支付订单不存在");
    ErrorCode PAY_ORDER_STATUS_IS_NOT_WAITING = new ErrorCode(1007002001, "支付订单不处于待支付");
    ErrorCode PAY_ORDER_STATUS_IS_NOT_SUCCESS = new ErrorCode(1007002002, "支付订单不处于已支付");
    ErrorCode PAY_ORDER_ERROR_USER = new ErrorCode(1007002003, "支付订单用户不正确");
    /**
     * 创建支付订单的支付数据提供服务不存在或错
     */
    ErrorCode PAY_ORDER_PAYMENT_PROVIDER_ERROR = new ErrorCode(1007002004, "获取支付信息失败");
    /**
     * 订单已取消
     */
    ErrorCode PAY_ORDER_CANCELLED = new ErrorCode(1007002005, "订单已取消");
    ErrorCode PAY_ORDER_PAID = new ErrorCode(1007002006, "订单已支付");

    /**
     * ========== ORDER 模块(拓展单) 1-007-003-000 ==========
     */
    ErrorCode PAY_ORDER_EXTENSION_NOT_FOUND = new ErrorCode(1007003000, "支付交易拓展单不存在");
    ErrorCode PAY_ORDER_EXTENSION_STATUS_IS_NOT_WAITING = new ErrorCode(1007003001, "支付交易拓展单不处于待支付");
    ErrorCode PAY_ORDER_EXTENSION_STATUS_IS_NOT_SUCCESS = new ErrorCode(1007003002, "支付订单不处于已支付");

    // ========== 支付模块(退款) 1-007-006-000 ==========
    ErrorCode PAY_REFUND_AMOUNT_EXCEED = new ErrorCode(1007006000, "退款金额超过订单可退款金额");
    ErrorCode PAY_REFUND_ALL_REFUNDED = new ErrorCode(1007006001, "订单已经全额退款");
    ErrorCode PAY_REFUND_CHN_ORDER_NO_IS_NULL = new ErrorCode(1007006002, "该订单的渠道订单为空");
    ErrorCode PAY_REFUND_SUCCEED = new ErrorCode(1007006003, "已经退款成功");
    ErrorCode PAY_REFUND_NOT_FOUND = new ErrorCode(1007006004, "支付退款单不存在");
    ErrorCode PAY_COUPON_LOCK_FAILED = new ErrorCode(1007006005, "无效的优惠券");
    ErrorCode PAY_COUPON_GET_LOCK_FAILED = new ErrorCode(1007006006, "获取优惠券信息失败");
    ErrorCode PAY_COUPON_RENTAL_ONLY = new ErrorCode(1007006007, "优惠券仅支持优惠租金");
    ErrorCode PAY_COUPON_ENOUGH = new ErrorCode(1007006008, "所选优惠券总优惠金额已超过租金金额, 请重新选择");

    /**
     * ========== 支付商户信息 1-007-004-000 ==========
     */
    ErrorCode PAY_MERCHANT_NOT_EXISTS = new ErrorCode(1007004000, "支付商户信息不存在");
    ErrorCode PAY_MERCHANT_EXIST_APP_CANT_DELETE = new ErrorCode(1007004001, "支付商户存在支付应用,无法删除");

    /**
     * 交易流水 1-007-005-000
     */
    ErrorCode FINANCE_MONEY_FLOW_NOT_EXISTS = new ErrorCode(1007005001, "交易流水不存在");

    ErrorCode FINANCE_MONEY_FLOW_REPEATED_PAYMENTS = new ErrorCode(1007005001, "订单已处理，请联系财务进行勾核");
    ErrorCode CONTRACT_RENT_ORDER_NOT_EXISTS = new ErrorCode(1007005001, "租金订单不存在");
    /**
     * 账户 100-007-006-000
     */
    ErrorCode FINANCE_ACCOUNT_CONCURRENT_MODIFY = new ErrorCode(1007006001, "账户更新中, 请稍后再试");
    ErrorCode FINANCE_ACCOUNT_NOT_ENOUGH = new ErrorCode(1007006002, "账户余额不足");
    ErrorCode FINANCE_ACCOUNT_NO_CONTRACT = new ErrorCode(1007006003, "未查询到有效合同, 请签约后再进行充值");
    ErrorCode FINANCE_ACCOUNT_NO_CHECKIN_ROOM = new ErrorCode(1007006004, "未查询到入住信息, 请入住后再进行充值");
    ErrorCode FINANCE_ACCOUNT_NOT_EXISTS = new ErrorCode(1007006005, "账户不存在");
    ErrorCode FINANCE_ROOM_ACCOUNT_ROOMMATE_NOT_FOUND = new ErrorCode(1007006006, "未查询到同住人信息");
    ErrorCode FINANCE_ROOM_ACCOUNT_WITHDRAW_NOT_FOUND = new ErrorCode(1007006007, "提现信息不存在");
    ErrorCode FINANCE_ROOM_ACCOUNT_WITHDRAW_STATUS = new ErrorCode(1007006008, "数据状态错误");
    ErrorCode FINANCE_ROOM_ACCOUNT_WITHDRAW_CONCURRENT_MODIFY = new ErrorCode(1007006009, "数据已更新, 请刷新后重试");
    ErrorCode FINANCE_ROOM_ACCOUNT_WITHDRAW_RESULT_TYPE_WRONG = new ErrorCode(1007006010, "审批意见参数错误");

    ErrorCode FINANCE_ORDER_PRICE_ERROR = new ErrorCode(1007006011, "支付订单金额超过了剩余可支付金额");

    ErrorCode FINANCE_BANK_TRANSFER_NOT_EXISTS = new ErrorCode(1007007001, "应付款单不存在");
    ErrorCode FINANCE_BANK_TRANSFER_CREATE_FAILED_WITH_OWNER_RENT_OUT = new ErrorCode(1007007002, "创建付款单失败，存在业主退租结算");

    ErrorCode FINANCE_INVOICE_NOT_EXISTS = new ErrorCode(1007008001, "开票信息不存在");
    ErrorCode FINANCE_INVOICE_CONFIG_EXISTS = new ErrorCode(1007008002, "企业税号已存在");
    ErrorCode FINANCE_INVOICE_CONFIG_NOT_EXISTS = new ErrorCode(1007008003, "企业税号不存在");
    ErrorCode FINANCE_INVOICE_CONFIG_APARTMENT = new ErrorCode(1007008004, "关联房源已经关联税号");
    ErrorCode FINANCE_INVOICE_CONFIG_APARTMENT_NOT_FOUND = new ErrorCode(1007008005, "未配置开票企业信息, 开票失败. 请联系管家");
    ErrorCode FINANCE_INVOICE_RENT_ORDER_UNPAID = new ErrorCode(1007008006, "账单未支付, 无法开票");
    ErrorCode FINANCE_INVOICE_RENT_ORDER_FEE_NOT_CONFIG = new ErrorCode(1007008007, "账单费用未配置税率, 无法开票. 请联系管家");
    ErrorCode FINANCE_INVOICE_RECORD_NOT_CONFIG = new ErrorCode(1007008008, "开票信息不存在");
    ErrorCode FINANCE_INVOICE_RECORD_INVOICED = new ErrorCode(1007008008, "开票信息已开票，不可重复开票");
    ErrorCode FINANCE_INVOICE_RECORD_PERSONAL_APPROVAL = new ErrorCode(1007008008, "开票需要审批，请联系管家");
    ErrorCode FINANCE_INVOICE_RECORD_NOT_PENDING = new ErrorCode(1007008009, "开票信息不可审核或已审核");
    ErrorCode FINANCE_INVOICE_RENT_ORDER_FEE_NO_CONFIG = new ErrorCode(1007008010, "用未配置费用及税率, 请配置");
    ErrorCode FINANCE_INVOICE_RENT_ORDER_FEE_NO_FOUND = new ErrorCode(1007008011, "没有可开票的账单费用, 请确认账单是否已支付");
    ErrorCode FINANCE_INVOICE_RECORD_TIMEOUT = new ErrorCode(1007008012, "账单支付时间已超过1年，不可操作");
    ErrorCode FINANCE_INVOICE_RECORD_RUSH_RED = new ErrorCode(1007008013, "状态不为已开票，不能冲红");
    ErrorCode FINANCE_INVOICE_NOT_SAME_APARTMENT = new ErrorCode(1007008014, "只能同一个项目合并开票，请重新选择");
    ErrorCode FINANCE_ACCOUNT_TYPE_ERROR = new ErrorCode(1007006001, "数据加载异常,请刷新后再试");

    ErrorCode FINANCE_WITHDRAWAL_NOT_APARTMENT = new ErrorCode(1008006001, "未查询到相关门店信息，无法进行退费");
    ErrorCode SETTLEMENT_BILL_WAITING = new ErrorCode(1009006001, "存在待确认账单");
    ErrorCode SETTLEMENT_BILL_SUCCESS = new ErrorCode(1009006002, "订单已清算，请勿重复清算");

    ErrorCode PAYMENT_BATCH_SIZE = new ErrorCode(1010006001, "操作订单不能大于{}条");
    ErrorCode PAYMENT_BATCH_NULL_IDS = new ErrorCode(1010006002, "订单不能为空,请勾选");
    ErrorCode PAYMENT_BATCH_NULL_DO = new ErrorCode(1010006003, "订单不存在");
    ErrorCode PAYMENT_BATCH_EXIST_PAID = new ErrorCode(1010006004, "应付款单已付款，请勿重复付款");

    /**
     * 收款主体，收款分账配置  100-007-007-000
     */

    ErrorCode FINANCE_COLLECTION_ERROR = new ErrorCode(1007007001, "门店收款主体未配置");

    ErrorCode FINANCE_PRIMARY_DIVIDE_ERROR = new ErrorCode(1007007002, "分账配置主账号未配置");

    ErrorCode FINANCE_DIVIDE_ACCOUNT_SUM_ERROR = new ErrorCode(1007007003, "分账配置商户数量不少于2");

    ErrorCode FINANCE_AMOUNT_BY_FEE_ERROR = new ErrorCode(1007007004, "订单根据费项获取支付金额失败");
    ErrorCode FINANCE_FEE_EMPTY = new ErrorCode(1007007005, "商户配置的费项为空");

    /**
     * 会员 100-007-008-000
     */

    ErrorCode GET_MEMBER_ERROR = new ErrorCode(1007008001, "获取会员信息失败");
    ErrorCode BIND_MEMBER_ERROR = new ErrorCode(1007008002, "绑定会员标识失败");

    ErrorCode CREATE_MEMBER_ERROR = new ErrorCode(1007008003, "创建会员失败");
    ErrorCode ENTERPRISE_ACCOUNT_ESTABLISH_ERROR = new ErrorCode(1007008004, "企业开户H5调用失败");

    ErrorCode ENTERPRISE_ACCOUNT_ESTABLISH_REPEAT = new ErrorCode(1007008005, "您已设置过该结算账户，请勿重复提交");


    /**
     * 商户 100-007-009-000
     */

    ErrorCode MERCHANT_NOT_EXIST = new ErrorCode(1007009001, "商户不存在");

    /**
     * 分账明细
     */

    ErrorCode DIVIDE_DETAIL_NOT_FOUND = new ErrorCode(100800001, "分账明细不存在");

    ErrorCode DIVIDE_DETAIL_STATUS_IS_NOT_WAITING = new ErrorCode(100800002, "分账明细不处于待支付");
    //
    ErrorCode PAYMENT_CHANGE_LOG_NOT_EXISTS = new ErrorCode(1010009001, "变更单不存在");
    ErrorCode PAYMENT_CHANGE_LOG_CORRECTED = new ErrorCode(1010009001, "已更正请勿重复更正！");

    /**
     * 提现
     */

    ErrorCode WITHDRAW_RECORD_NOT_EXIST = new ErrorCode(1010010001, "提现记录不存在！");

    ErrorCode WITHDRAW_STATUS_ERROR = new ErrorCode(1010010002, "提现状态不能发起提现！");


    /**
     * 凭证
     */
    ErrorCode VOUCHER_ID_ERROR = new ErrorCode(1011000001, "同步失败");
}
